#define _CRT_SECURE_NO_WARNINGS 1
#include<stdio.h>
int main(void)
{
	int m = 0;
	int n = 0;
	int i, j;
	scanf("%d%d", &m, &n);

	int arr[10][10] = { 0 };
	for (i = 0; i < m; i++)
	{
		for (j = 0; j < n; j++)
		{
			scanf("%d", &arr[i][j]);
		}
	}

	scanf("%d%d", &m, &n);
	printf("%d", arr[m-1][n-1]);
	return 0;
}